package service;

import Utils.db.pojo.Page;
import Utils.db.service.PageService;
import pojo.Task;

import java.lang.reflect.InvocationTargetException;
import java.sql.SQLException;
import java.util.List;

/**
 * @author d11yu
 */
public interface TaskService extends PageService<Task> {
    public void addTask(Task task);

    public void deleteTaskById(Integer id);

    public void updateTaskById(Task task);

    public Task queryTaskById(Integer id) throws SQLException;

    public List<Task> queryAllTasks() throws SQLException;
    public List<Task> queryAllTasksByUserId(Integer userId) throws SQLException;

    public List<Task> queryTasksByTasknameBlur(String taskname) throws SQLException;

    public Page<Task> getPageByUserId(Integer pn, Integer ecp, String urlAction, Integer userId) throws SQLException, InvocationTargetException, IllegalAccessException;

    public Page<Task> getPageByTasknameBlurByUserId(Integer pn, Integer ecp, String urlAction, String taskname, Integer userId) throws SQLException, InvocationTargetException, IllegalAccessException;
}
